<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>我的钱包 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .wallet-card {
      background: linear-gradient(135deg, #ff7e2d, #ff9d5c);
      border-radius: 12px;
      color: white;
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .record-item {
      border-bottom: 1px solid var(--border);
    }
    
    .record-item:last-child {
      border-bottom: none;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="user_center.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">我的钱包</h1>
      <a href="wallet_settings.html" class="text-sm text-gray-500">
        <i class="fas fa-cog"></i>
      </a>
    </div>
    
    <!-- 钱包卡片 -->
    <div class="p-4">
      <div class="wallet-card p-4">
        <div class="flex items-center justify-between mb-2">
          <h2 class="text-lg font-medium">账户余额</h2>
          <a href="transaction_records.html" class="text-sm opacity-80">交易记录 <i class="fas fa-chevron-right text-xs"></i></a>
        </div>
        
        <div class="flex items-baseline">
          <span class="text-3xl font-bold">¥358.50</span>
        </div>
        
        <div class="flex mt-4">
          <a href="#rechargeModal" class="bg-white bg-opacity-20 rounded-lg px-6 py-2 flex items-center justify-center mr-3">
            <i class="fas fa-plus-circle mr-1"></i>
            <span>充值</span>
          </a>
          <a href="#withdrawModal" class="bg-white bg-opacity-20 rounded-lg px-6 py-2 flex items-center justify-center">
            <i class="fas fa-arrow-circle-right mr-1"></i>
            <span>提现</span>
          </a>
        </div>
      </div>
    </div>
    
    <!-- 支付方式 -->
    <div class="px-4 py-3">
      <h2 class="text-base font-medium mb-3">支付方式</h2>
      <div class="bg-white rounded-lg">
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <img src="https://via.placeholder.com/36" alt="微信支付" class="w-9 h-9 mr-3">
            <div>
              <p class="font-medium">微信支付</p>
              <p class="text-xs text-gray-500">微信账号：wei***@qq.com</p>
            </div>
          </div>
          <div class="flex items-center">
            <span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded mr-2">已绑定</span>
            <i class="fas fa-chevron-right text-gray-300"></i>
          </div>
        </div>
        
        <div class="flex items-center justify-between p-4 border-b border-gray-100">
          <div class="flex items-center">
            <img src="https://via.placeholder.com/36" alt="支付宝" class="w-9 h-9 mr-3">
            <div>
              <p class="font-medium">支付宝</p>
              <p class="text-xs text-gray-500">支付宝账号：138****6789</p>
            </div>
          </div>
          <div class="flex items-center">
            <span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded mr-2">已绑定</span>
            <i class="fas fa-chevron-right text-gray-300"></i>
          </div>
        </div>
        
        <div class="flex items-center justify-between p-4">
          <div class="flex items-center">
            <img src="https://via.placeholder.com/36" alt="银行卡" class="w-9 h-9 mr-3">
            <div>
              <p class="font-medium">银行卡</p>
              <p class="text-xs text-gray-500">工商银行(1234)</p>
            </div>
          </div>
          <div class="flex items-center">
            <span class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded mr-2">已绑定</span>
            <i class="fas fa-chevron-right text-gray-300"></i>
          </div>
        </div>
      </div>
      
      <div class="mt-3">
        <a href="add_payment.html" class="flex items-center justify-center py-3 bg-white rounded-lg">
          <i class="fas fa-plus primary-color mr-2"></i>
          <span>添加支付方式</span>
        </a>
      </div>
    </div>
    
    <!-- 交易记录 -->
    <div class="px-4 py-3 bg-gray-50">
      <div class="flex justify-between items-center mb-3">
        <h2 class="text-base font-medium">近期交易</h2>
        <a href="transaction_records.html" class="text-sm primary-color">查看全部 <i class="fas fa-chevron-right text-xs"></i></a>
      </div>
      
      <div class="bg-white rounded-lg">
        <div class="record-item p-4">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">家政保洁服务</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-15 15:30</p>
            </div>
            <span class="text-sm text-gray-500">-¥158.00</span>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">账户充值</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-12 09:15</p>
            </div>
            <span class="text-sm primary-color">+¥500.00</span>
          </div>
        </div>
        
        <div class="record-item p-4">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">医院陪护服务</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-08 14:45</p>
            </div>
            <span class="text-sm text-gray-500">-¥299.00</span>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 充值弹窗 -->
    <div class="fixed inset-0 bg-black bg-opacity-50 hidden flex items-center justify-center z-20" id="rechargeModal">
      <div class="bg-white rounded-lg w-80 overflow-hidden">
        <div class="p-4 border-b border-gray-100">
          <h3 class="text-center font-medium">账户充值</h3>
        </div>
        <div class="p-4">
          <div class="mb-4">
            <label class="block text-sm text-gray-600 mb-2">充值金额</label>
            <div class="relative">
              <span class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500">¥</span>
              <input type="number" class="w-full border border-gray-300 rounded-lg px-8 py-2 focus:outline-none focus:border-primary" placeholder="请输入充值金额">
            </div>
          </div>
          
          <div class="grid grid-cols-3 gap-2 mb-4">
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥50</button>
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥100</button>
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥200</button>
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥500</button>
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥1000</button>
            <button class="border border-gray-300 rounded-lg py-2 text-center">¥2000</button>
          </div>
          
          <div class="mb-4">
            <label class="block text-sm text-gray-600 mb-2">支付方式</label>
            <div class="space-y-2">
              <label class="flex items-center justify-between border border-gray-300 rounded-lg p-3">
                <div class="flex items-center">
                  <img src="https://via.placeholder.com/24" alt="微信支付" class="w-6 h-6 mr-2">
                  <span>微信支付</span>
                </div>
                <input type="radio" name="payment" value="wechat" checked>
              </label>
              
              <label class="flex items-center justify-between border border-gray-300 rounded-lg p-3">
                <div class="flex items-center">
                  <img src="https://via.placeholder.com/24" alt="支付宝" class="w-6 h-6 mr-2">
                  <span>支付宝</span>
                </div>
                <input type="radio" name="payment" value="alipay">
              </label>
            </div>
          </div>
          
          <div class="flex">
            <button class="flex-1 py-2 border border-gray-300 rounded-lg mr-2" id="cancelRecharge">取消</button>
            <button class="flex-1 py-2 btn-primary rounded-lg">确认充值</button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 提现弹窗 -->
    <div class="fixed inset-0 bg-black bg-opacity-50 hidden flex items-center justify-center z-20" id="withdrawModal">
      <div class="bg-white rounded-lg w-80 overflow-hidden">
        <div class="p-4 border-b border-gray-100">
          <h3 class="text-center font-medium">账户提现</h3>
        </div>
        <div class="p-4">
          <div class="mb-4">
            <label class="block text-sm text-gray-600 mb-2">提现金额</label>
            <div class="relative">
              <span class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-500">¥</span>
              <input type="number" class="w-full border border-gray-300 rounded-lg px-8 py-2 focus:outline-none focus:border-primary" placeholder="请输入提现金额">
              <span class="absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-primary-color">全部提现</span>
            </div>
            <p class="text-xs text-gray-500 mt-1">当前可提现金额：¥358.50</p>
          </div>
          
          <div class="mb-4">
            <label class="block text-sm text-gray-600 mb-2">提现到</label>
            <div class="space-y-2">
              <label class="flex items-center justify-between border border-gray-300 rounded-lg p-3">
                <div class="flex items-center">
                  <img src="https://via.placeholder.com/24" alt="微信支付" class="w-6 h-6 mr-2">
                  <span>微信支付</span>
                </div>
                <input type="radio" name="withdraw" value="wechat" checked>
              </label>
              
              <label class="flex items-center justify-between border border-gray-300 rounded-lg p-3">
                <div class="flex items-center">
                  <img src="https://via.placeholder.com/24" alt="支付宝" class="w-6 h-6 mr-2">
                  <span>支付宝</span>
                </div>
                <input type="radio" name="withdraw" value="alipay">
              </label>
              
              <label class="flex items-center justify-between border border-gray-300 rounded-lg p-3">
                <div class="flex items-center">
                  <img src="https://via.placeholder.com/24" alt="银行卡" class="w-6 h-6 mr-2">
                  <span>银行卡(1234)</span>
                </div>
                <input type="radio" name="withdraw" value="bank">
              </label>
            </div>
          </div>
          
          <div class="flex">
            <button class="flex-1 py-2 border border-gray-300 rounded-lg mr-2" id="cancelWithdraw">取消</button>
            <button class="flex-1 py-2 btn-primary rounded-lg">确认提现</button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 充值弹窗
      const rechargeLinks = document.querySelectorAll('a[href="#rechargeModal"]');
      const rechargeModal = document.getElementById('rechargeModal');
      const cancelRecharge = document.getElementById('cancelRecharge');
      
      rechargeLinks.forEach(link => {
        link.addEventListener('click', function(e) {
          e.preventDefault();
          rechargeModal.classList.remove('hidden');
          rechargeModal.classList.add('flex');
        });
      });
      
      cancelRecharge.addEventListener('click', function() {
        rechargeModal.classList.add('hidden');
        rechargeModal.classList.remove('flex');
      });
      
      // 提现弹窗
      const withdrawLinks = document.querySelectorAll('a[href="#withdrawModal"]');
      const withdrawModal = document.getElementById('withdrawModal');
      const cancelWithdraw = document.getElementById('cancelWithdraw');
      
      withdrawLinks.forEach(link => {
        link.addEventListener('click', function(e) {
          e.preventDefault();
          withdrawModal.classList.remove('hidden');
          withdrawModal.classList.add('flex');
        });
      });
      
      cancelWithdraw.addEventListener('click', function() {
        withdrawModal.classList.add('hidden');
        withdrawModal.classList.remove('flex');
      });
      
      // 点击模态框背景关闭
      document.querySelectorAll('.fixed.inset-0.bg-black.bg-opacity-50').forEach(modal => {
        modal.addEventListener('click', function(e) {
          if (e.target === this) {
            this.classList.add('hidden');
            this.classList.remove('flex');
          }
        });
      });
      
      // 快捷金额选择
      const amountButtons = document.querySelectorAll('.grid.grid-cols-3.gap-2 button');
      const amountInput = document.querySelector('input[type="number"]');
      
      amountButtons.forEach(button => {
        button.addEventListener('click', function() {
          const amount = this.textContent.replace('¥', '');
          amountInput.value = amount;
        });
      });
    });
  </script>
</body>
</html> 